import { Scene, Scale } from 'phaser';

class MarketMap extends Scene {
  path= [];
  player: any;
  constructor() {
    super();
  }

  preload() {
    // this.load.image('bg', 'assets/e.png');
    // this.load.spritesheet('player', 'assets/c.png', { frameWidth: 120, frameHeight: 80 });
  }

  create() {
    // this.add.image(940, 940, 'bg').setScale(60/94).setOrigin(94/60, 94/60);
    // this.player = this.physics.add.sprite(0, 0, 'player');

    // // // 播放角色动画  
    // var animation = this.player.anims.create({  
    //     key: 'walk',  
    //     frames: this.anims.generateFrameNumbers('player', { start: 0, end: 3 }),  
    //     frameRate: 8,  
    //     repeat: -1
    // });  
    // this.player.anims.play('walk');
    // console.log(this.cameras.main);
    // this.cameras.main = this.cameras.add(0, 0, 1280, 960);
  }

  update() {
    // if (this.path && this.path.length) {
    //   const p = this.path.shift();
    //   this.player.x = p[0] * 6;
    //   this.player.y = p[1] * 6;
    // }
  }
}

export default MarketMap;